var MyPlugin = {

    StringReturnValueFunction: function () {
        var returnStr = window.location.search;
        var buffer = _malloc(lengthBytesUTF8(returnStr) + 1);
        writeStringToMemory(returnStr, buffer);
        return buffer;

        //var returnStr = "http://item.taobao.com/item.htm?a=1&b=2&c=&d=xxx&e";
        // var arr = buffer.split("?")[1].split("&");//根据实际修改
        // var o = {};
        // for (var i = 0; i < arr.length; i++) {
        //     var newarr = arr[i].split("=");
        //     o[newarr[0]] = newarr[1];
        // }
        // return o;
    }
};

mergeInto(LibraryManager.library, MyPlugin);